Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect compiler directives during mutation #3116

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

dupdob
Copy link
Member

@dupdob dupdob commented Nov 21, 2024

Ensure compiler directives (#if, #pragma....) are not mutated but kept around mutated syntax nodes.

This required small changes in every mutator, as they are not responsible for removing any directive.
I took this as an opportunity to improve the design.

Also, added generation of semantic model during mutation tests to ensure mutator related unit tests are relevant.
I may have fixed some minor issues on them.

Also added some top level statement in integration test as it was a quick win

FIxes #3081, #3102

@dupdob dupdob force-pushed the improve_mutation_of_directives branch from c6e5ac8 to 6826228 Compare November 21, 2024 17:32
@dupdob dupdob force-pushed the improve_mutation_of_directives branch from f34711e to e9ba29d Compare November 22, 2024 10:30
@dupdob dupdob force-pushed the improve_mutation_of_directives branch from e9ba29d to bfec606 Compare November 22, 2024 10:42
@dupdob dupdob force-pushed the improve_mutation_of_directives branch from c3017ec to 80871b8 Compare November 22, 2024 13:09
@dupdob
Copy link
Member Author

dupdob commented Nov 22, 2024

I am happy to see this PR reduces the total number of lines, and it increases the number of mutations. This is probably related to the redesign of the pattern mutator that I modified so it no longer does some internal scan and reenabled orchestration of patterns in general

@dupdob dupdob marked this pull request as ready for review November 22, 2024 16:18
@dupdob dupdob force-pushed the improve_mutation_of_directives branch from 4102df8 to f5bbfd9 Compare November 22, 2024 16:22
@dupdob dupdob force-pushed the improve_mutation_of_directives branch from f5bbfd9 to df53cc3 Compare November 22, 2024 16:28
Copy link

sonarcloud bot commented Nov 22, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stryker messes with compiler directives
1 participant